using System;
using System.Windows.Forms;
using Core;
using SdlDotNet.Core;
using SpaceTrader.WinUI;

namespace SpaceTrader
{
    internal class Program
    {
        public static readonly Game RunningGame = new Game();

        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        private static void Main()
        {
            Events.Quit += Events_Quit;
            Events.Tick += Events_Tick;

            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Application.Run(new Editor());

            Events.QuitApplication();
        }

        private static void Events_Quit(object sender, QuitEventArgs e)
        {
            Application.Exit();
        }

        private static void Events_Tick(object sender, TickEventArgs e)
        {
            RunningGame.Update();
        }
    }
}